package com.itheima.thread.api.demo02;

public class MyRunnableDemo {

    public static void main(String[] args) {

        MyRunnable myRunnable = new MyRunnable();

//        Thread t1 = new Thread(myRunnable);
//        Thread t2 = new Thread(myRunnable);
//        t1.setName("A");
//        t1.setName("B");

        Thread t1 = new Thread(myRunnable, "A");
        Thread t2 = new Thread(myRunnable, "B");

        t1.start();
        t2.start();

    }
}
